import myServer from './myServer.js'

// **********************首页
// 获取所有音乐榜单
export function toplistDetail(){
	return myServer({url:'/toplist/detail',method:'get'})
}

// ***********************list
// 获取某一音乐榜单详情 /playlist/detail
export function playlistDetail(id){
	return myServer({
		url:'/playlist/detail',
		data:{id},
		method:'get'
	})
}

// ***********************detail
// 获取歌曲详情 song/detail
export function songDetail(id){
	return myServer({
		url:'/song/detail',
		data:{ids:id},
		method:'get'
	})
}

// 获取歌曲相似歌曲推荐
export function simiSong(id){
	return myServer({
		url:'/simi/song',
		data:{id},
		method:'get'
	})
}

// 获取音乐评论
export function commentMusic(id){
	return myServer({
		url:'/comment/music',
		data:{id},
		method:'get'
	})
}

// 获取歌曲歌词
export function lyric(id){
	return myServer({
		url:'/lyric',
		data:{id},
		method:'get'
	})
}

// 获取歌曲mp3
export function songUrl(id){
	return myServer({
		url:'/song/url',
		data:{id},
		method:'get'
	})
}

// ***************************search
// 搜索建议
export function searchSuggest({keywords,type}){
	return myServer({
		url:'/search/suggest?keywords',
		data:{keywords,type},
		method:'get'
	})
}

// 确定搜索的歌曲并获得
export function search({keywords}){
	return myServer({
		url:'/search',
		data:{keywords},
		method:'get'
	})
}

// 热搜榜
export function searchHot(){
	return myServer({
		url:'/search/hot/detail',
		method:'get'
	})
}